﻿using NfsBLL;
using NfsCommon.Util;
using NfsModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MobileWeb.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
        #region 首页显示(根据当前登录人的ID来显示)
        public JsonResult GetMeById()
        {
            int id = int.Parse(CookieHelper.GetDecodeCookie("nfs_UserId"));
            AgencyBLL bll = new AgencyBLL();
            agency model = bll.GetModel_account(id);
            if (model == null)
            {
                return Json("", JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json(new { model = model }, JsonRequestBehavior.AllowGet);
            }
        }
        #endregion
    }
}
